# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.Jobs.V3.Model.CompensationInfo do
  @moduledoc """
  Job compensation details.

  ## Attributes

  *   `annualizedBaseCompensationRange` (*type:* `GoogleApi.Jobs.V3.Model.CompensationRange.t`, *default:* `nil`) - Output only. Annualized base compensation range. Computed as base compensation entry's CompensationEntry.compensation times CompensationEntry.expected_units_per_year. See CompensationEntry for explanation on compensation annualization.
  *   `annualizedTotalCompensationRange` (*type:* `GoogleApi.Jobs.V3.Model.CompensationRange.t`, *default:* `nil`) - Output only. Annualized total compensation range. Computed as all compensation entries' CompensationEntry.compensation times CompensationEntry.expected_units_per_year. See CompensationEntry for explanation on compensation annualization.
  *   `entries` (*type:* `list(GoogleApi.Jobs.V3.Model.CompensationEntry.t)`, *default:* `nil`) - Optional. Job compensation information. At most one entry can be of type CompensationInfo.CompensationType.BASE, which is referred as ** base compensation entry ** for the job.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :annualizedBaseCompensationRange => GoogleApi.Jobs.V3.Model.CompensationRange.t() | nil,
          :annualizedTotalCompensationRange =>
            GoogleApi.Jobs.V3.Model.CompensationRange.t() | nil,
          :entries => list(GoogleApi.Jobs.V3.Model.CompensationEntry.t()) | nil
        }

  field(:annualizedBaseCompensationRange, as: GoogleApi.Jobs.V3.Model.CompensationRange)
  field(:annualizedTotalCompensationRange, as: GoogleApi.Jobs.V3.Model.CompensationRange)
  field(:entries, as: GoogleApi.Jobs.V3.Model.CompensationEntry, type: :list)
end

defimpl Poison.Decoder, for: GoogleApi.Jobs.V3.Model.CompensationInfo do
  def decode(value, options) do
    GoogleApi.Jobs.V3.Model.CompensationInfo.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.Jobs.V3.Model.CompensationInfo do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
